# Contributor: Leo <thinkabit.ukim@gmail.com>
# Maintainer: Willow Barraco <contact@willowbarraco.fr>
pkgname=kakoune
pkgver=2024.05.18
pkgrel=0
pkgdesc="Code editor heavily inspired by Vim, but with less keystrokes"
url="https://kakoune.org"
arch="all"
license="Unlicense"
checkdepends="perl"
subpackages="$pkgname-doc"
source="$pkgname-$pkgver.tar.gz::https://github.com/mawww/kakoune/archive/v$pkgver.tar.gz
	alpine-linux.kak
	0001-fix-CXXFLAGS.patch
	constexpr.patch
	"

build() {
	make debug=no
}

check() {
	make check
}

package() {
	make -j1 PREFIX="/usr" DESTDIR="$pkgdir/" debug=no install
	install -Dm644 "$srcdir"/alpine-linux.kak \
		-t "$pkgdir"/usr/share/kak/autoload/filetype/
}

sha512sums="
1e5ccd4882dd3a8682e4e53f562296e737ae9238a343cf543ddbf71cbabc9543d21397a41d91a187593ea0809d1935bf41f83f5ab6ad2e41b213ed03ab32b79a  kakoune-2024.05.18.tar.gz
c5b11dc28adf785b4e83637fe1d5c9db334616d2d3f6c667823745e273f739c57d0d408b9bec8a65210e3c7ccb80a5b488ebbb3c0c5de8bdec13e1b4b4d02b77  alpine-linux.kak
83295606d1191ae66339ccd813b5f123ab49b22bafcdd578b109ea367dae52c5de7f6b8e44119579163befb349e3b76b4b9e4b20f951466dc2c270c38e64ceb1  0001-fix-CXXFLAGS.patch
aa5df7a115e7b7ecaba85794ea56961fd1c638f4590300474fa72c8900ecb36742d7c8075ebc48151f40ba2dc427c4d8bcca9c844793768a1d0c4e66f22d328c  constexpr.patch
"
